#include <stdio.h>
#include <stdlib.h>

int main()
{
    int max1(int, int);
    int max2(int, int, int, int);

    int a, b, c, d, max;
    printf("请输入4个数:");
    scanf("%d%d%d%d", &a, &b, &c, &d);
    max = max2(a, b, c, d);
    printf("max=%d\n", max);

    system("pause");
    return 0;
}

int max1(int x, int y)
{
    if (x > y)
    {
        return x;
    }
    else
    {
        return y;
    }
}

int max2(int a, int b, int c, int d)
{
    int max1(int, int);
    int max;
    max = max1(a, b);
    max = max1(max, c);
    max = max1(max, d);
    return max;
}